﻿<Page
    x:Class="PanViewDemoApp.FlattenExample"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:PanViewDemoApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontSize="20"
    Foreground="Black">
    <Canvas>
        <Border
            Height="120"
            Width="200"
            Background="#40FF0000">
            <Border.RenderTransform>
                <CompositeTransform
                    x:Name="J"
                    TranslateX="100"
                    TranslateY="30"
                    Rotation="45" />
            </Border.RenderTransform>
            <TextBlock
                Foreground="Red"
                Margin="5">Tx=100 Ty=30 R=45</TextBlock>
        </Border>
        <Border
            Height="120"
            Width="200"
            Background="#4000FF00">
            <Border.RenderTransform>
                <TransformGroup>
                    <CompositeTransform
                        x:Name="K"
                        TranslateX="120"
                        TranslateY="-80"
                        Rotation="-60" />
                    <CompositeTransform
                        TranslateX="100"
                        TranslateY="30"
                        Rotation="45" />
                </TransformGroup>
            </Border.RenderTransform>
            <TextBlock
                Foreground="Green"
                Margin="3">Tx=100 Ty=30 R=45<LineBreak />Tx=120 Ty=-80 R=-60</TextBlock>
        </Border>
        <Border
            Height="120"
            Width="200"
            BorderBrush="Blue"
            BorderThickness="3">
            <Border.RenderTransform>
                <CompositeTransform
                    x:Name="L"
                    TranslateX="241"
                    TranslateY="58"
                    Rotation="-15" />
            </Border.RenderTransform>
            <TextBlock
                Foreground="Blue"
                Margin="3"
                VerticalAlignment="Bottom">Tx=241 Ty=58 R=-15</TextBlock>
        </Border>
    </Canvas>
</Page>